<%@page contentType="text/html;charset=utf-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>注册</title>
<style>
.back{
    background-image: url("../img/登录背景.jpg")
}
.color{
    color: red
}
</style>
</head>
<body class="back">
<div style="width:320px;height:400px;margin:auto;margin-top:20%">
    <h1>注册</h1>
    <p><em class="color">*</em> 用户名：
        <input id="username" type="text" name="username" valus="">
    </p>
    <p><em class="color">*</em> 密码：
        <input id="password" type="text" name="password" valus="">
    </p>
    <p>激活码：
        <input id="code" type="text" name="password" valus="">
    </p><br>
    <button style="margin-left:95px" type="button" onclick="check('');">注册</button><br>
    <h6>注：有<em class="color">*</em> 的必填</h6>
</div>
<script>
function check(){
    if(username.value!="" && password.value!=""){
    // window.location.href="http://www.baidu.com/";
        alert("注册成功！");
    }
    else{
        alert("注册失败！用户名或密码不能为空！");
        password.value="";
    }
}
</script>
</body>
</html>